<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
    <head>
        <meta charset="UTF-8">
        <title>图书列表</title>
    </head>
    <body>
        <div th:insert="~{fragments/header::logout}"></div>
        <h2>图书列表</h2>
        <div sec:authorize="hasAuthority('BookAdd')">
            <button onclick="">添加</button>
        </div>
        <table border="1" cellspacing="0" style="width: 20%">
            <thead>
                <tr>
                    <th>名称</th>
                    <th>出版社</th>
                    <th>价格</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>Java从入门到放弃</td>
                    <td>机械工业出版社</td>
                    <td>39</td>
                    <td><span sec:authorize="hasAuthority('BookDetail')"><a href="/book/detail.html">查看</a></span></td>
                </tr>
                <tr>
                    <td>MySQ从删库到跑路</td>
                    <td>清华大学出版社</td>
                    <td>59</td>
                    <td><span sec:authorize="hasAuthority('BookDetail')"><a href="/book/detail.html">查看</a></span></td>
                </tr>
            </tbody>
        </table>
    </body>
</html>